/*
 * @Author: your name
 * @Date: 2021-11-18 01:20:28
 * @LastEditTime: 2021-11-25 18:49:53
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \admin-template\src\api\businessTask\api.js
 */
import request from '@/utils/request'

const businessTaskUrl = {
  page: '/businessTask/page'
}

export default businessTaskUrl

export function businessTaskPage(query) {
  return request({
    url: '/businessTask/page',
    method: 'get',
    params: query
  })
}

export function businessTaskSimulation(params) {
  return request({
    url: `/businessTask/simulation`,
    method: 'post',
    data: params
  })
}

export function businessTaskReport(params) {
  return request({
    url: `/businessTask/report`,
    method: 'post',
    data: params
  })
}

export function businessTaskUpdate(params) {
  return request({
    url: `/businessTask/update`,
    method: 'post',
    data: params
  })
}

// 上传文件
export function businessTaskFile(params) {
  return request({
    url: `/businessTask/enclosures/upload`,
    method: 'post',
    data: params
  })
}

// 生成报告
export function businessTaskExportReport(businessId) {
  return request({
    url: `/businessTask/exportReport/${businessId}`,
    method: 'get'
  })
}

export function taskTrackPage(businessId) {
  return request({
    url: `/taskTrack/page?taskId=${businessId}`,
    method: 'get'
  })
}
